You can use several design patterns, such as Composite, Iterator, and Chain of Responsibility, to implement composition variation between services. 可以使用诸如Composite、Iterator和ChainofResponsibility等设计模式实现服务之间的组合变化。
One GoF pattern could fit perfectly in this situation: Chain of Responsibility. 有一个GoF模式非常适合这种情形:职责链(ChainofResponsibility)。
The Chain of Responsibility design pattern is intended to decouple the sender ( the DOM element) of an event from the receiver ( your code) so that more than one object has a chance to claim responsibility for handling the event ( your views and models). 责任链设计模式旨在将事件的发送者(DOM元素)与接受者分离开来,以便更多的对象有机会处理事件(视图和模型)。
Try modeling this scenario using the Chain of Responsibility Design Pattern in Rational Software Architect. 尝试在RationalSoftwareArchitect中使用责任链设计模式为该情境建模。
The Chain of Responsibility pattern supports decoupling by passing a request between potential receivers, whereas the Command pattern supports using a command object to encapsulate a request. 责任链模式通过在可能的接受方传递请求来解耦,而命令模式是通过将请求封装成对象。
To follow his view, a chain of responsibility should be brought in place to realize the high standard shipping and on this chain are links of port, shipping company, ship management department and shipbuilding, etc. 按照他的观点,要实现高标准航运,需要建立一条责任链,其中涉及到港口、航运公司、航运管理部门、造船等。
As a loop of the world economical chain, Chinese entrepreneurs also need to face the issue of corporate social responsibility. 作为世界经济链条上的一环,我国企业也要面对企业社会责任问题。
Market main body should strengthen the contract liability based on vertical cooperation, clear food industry chain on the lower reaches of the responsibility of the parties and the target, strengthen food safety management and information construction. 市场主体应该加强以契约责任为基础纵向合作关系,明确食品产业链上下游各方的责任和目标,加强食品安全管理和信息建设。
In international trade, corporate social responsibility could transmit along the international supply chain between countries; the change in the concept of consumer demand has made the trend that corporate social responsibility linked to international trade unstoppable. 在国际贸易中,企业社会责任会沿着国际供应链在国家之间传导,消费者需求观念的转变,使得国际贸易与企业社会责任等道德因素挂钩已成为大势所趋。